Users surf the World Wide Web by using web browsers on their personal computers to access web pages and other data that are stored on remote web servers, where the personal computers are connected to the remote web servers via the Internet. The Internet is a global system of interconnected computer networks. The World Wide Web comprises a set of inter-linked hypertext documents called web pages.
One common form of network based communication is exchanging electronic messages on the Worldwide Web (“WWW”). Content on the Worldwide Web is typically accessed in a client/server model. A “Web browser” of a client computer system sends a request to access content that is provided by a “Web Server” of a server computer system (e.g., by entering a Uniform Resource Locator (“URL”) into the Web browser). If the user of the Web browser is authorized to access the content, the Web server typically provides the content to the Web browser. In a Web environment, content and requests for content, are frequently transported using Hypertext Transfer Protocol (“HTTP”). Web-based content can be provided in HyperText Markup Language (“HTML”) pages, style sheets, images, scripts, etc.
Most, if not all Web browsers, cache portions of Web-based content in a common storage location (the browser cache) so that subsequent renderings of a Web page can be presented more efficiently. For example, when a Web browser receives a Web page from a Web server, the Web browser can locally cache portions of the content included in the Web page. Thus, if the Web browser is subsequently directed to the same Web page, the Web browser can check the common storage location for cached portions of content and any cached portions of content can be combined with other content received via the network to construct the Web page. Accordingly, using locally cached content potentially reduces the amount of data that is transferred over a network in order to display content from the Web server. As a result, Web pages can be rendered more quickly improving the user experience.
However, typically, even if only a portion of a Web page changes the entire page is reloaded over the network for display on a Web browser. For example it may be that a Web browser accesses a Web page, downloads content of the Web page via network communication, and caches content from the Web page. If the content of the Web page subsequently changes, the Web browser can be required to re-download the entire Web page even if only small portions of the Web page have changed.
Thus more recently, some Web browsers have implemented partial page updates to better utilize cached content. Content is re-downloaded when an applicable portion of a Web page changes. However, a Web browser is not necessarily required to re-download all the content of Web page in response to a change to a portion of the Web page. For example, when a single image in a Web page changes, the Web browser can detect the change and re-download the single image without having to re-download other cached content that has not changed.
Some Web-based applications also permit Web browsers to interact with data from a database (e.g., an SQL database). A Web server receives a request from a Web browser, accesses an appropriate portion of database data, and returns the database data to the Web browser. Depending on the configuration of the Web based application, a user may also be able to change portions of database data through the Web browser. For example, a user may be able to create and modify database records through the Web browser. In some environments, a user is able to implement SQL operations (CREATE TABLE, SELECT, INSET, UPDATE, DELETE, etc.) through a Web browser. Thus, a Web browser essentially provides a user-interface for manipulating database data over a network (e.g., the Internet).
U.S. Pat. No. 7,778,987 (“Hawkins”) discloses a method for caching database data in a web browser. Hawkins discloses that the computer system receives a portion of the database from the Web server. The computer system locally stores the received database portion at the computer system. The locally stored database portion is locally accessible to the Web browser such that data from the locally stored database portion can be locally provided to the Web browser without the data being included in network based communication. The computer system retains an indication that the database portion was received from the specified domain to prevent script code from Web servers in other domains from accessing the database portion.
Hawkins discloses that a computer system renders tabular database data within the Web browser. The computer system sends a Web based request to a Web server in a specified domain indicated by a specified domain name. The Web based request is for accessing a Web page that includes a portion of a database stored in a database accessible to the Web server.
Hawkins discloses that the computer system receives a request from the Web server for access to a locally stored database portion that is stored locally at the computer system. The computer system accesses a stored domain name indicative of a domain that previously sent the locally stored database portion to the computer system. The computer system compares the specified domain name to the stored domain name. The computer system determines that the specified domain name and the stored domain name are sufficiently similar to allow responses from the Web server to include database data from the locally stored database portion. The computer system includes data from the locally stored database portion in a Web based response to the Web based request based on the determination. The computer system presents the Web based response including the data from the locally stored database portion at the Web browser.
However, current methods do not allow for maintaining the security of cached database data in a browser. As a first example, a computer system may receive a first database portion from a first web server at a first domain and store that database portion in a locally accessible storage. The computer system retains an indication that the first database portion was received from the first domain. It is desirable that the computer system only allow access to the first database portion by other web servers in the first domain and not web servers in other domains. However, a second web server in a second domain may be malicious. The computer system may receive a request from the second web server for access to the locally stored first database portion. The second web server may send a false indication to the computer system that it is in the first domain rather than in the second domain. The false indication may be accepted by the computer system as truthful, and the second web server will be able to access the first database portion. Current methods do not provide a method for the computer system to prevent the second web server from accessing first database portion.
As a second example, a first web server at a first domain may be malicious. A computer system may receive a first database portion from the first web server at a first domain, but the first web server may send a false indication that it is in the second domain rather than the first domain. The false indication may be accepted by the computer system as truthful. The computer system retains, incorrectly, an indication that the first database portion was received from the second domain. The computer system seeks to only allow access to the first database portion by other web servers in the second domain due to its incorrect information. When a second web server in a second domain accesses the database portion, this may lead to errors or corruptions on web pages served from the second web server. Current methods do not provide a method for the computer system to prevent the first web server from sending a successful request to store a first database portion with a false indication that the first database portion is from a second domain.